using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;
using Domain.Entidades;

namespace Data.Models.Mapping
{
    public class setorMap : EntityTypeConfiguration<setor>
    {
        public setorMap()
        {
            // Primary Key
            this.HasKey(t => t.set_codigo);

            // Properties
            this.Property(t => t.set_descricao)
                .IsRequired()
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("setor");
            this.Property(t => t.set_codigo).HasColumnName("set_codigo");
            this.Property(t => t.set_descricao).HasColumnName("set_descricao");
        }
    }
}
